package vista;

import java.awt.BorderLayout;
import javabean.JPanelImagen;

import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.WindowConstants;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class JConsultaRecord extends javax.swing.JFrame {
	
	private JPanelImagen pnlImagenFondo;
	private JTable tblConsulta;
	private JScrollPane scpListado;
	
	public JConsultaRecord() {
		super("*** TOP 5 MASTERMIND ***");
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				pnlImagenFondo = new JPanelImagen();
				getContentPane().add(pnlImagenFondo, BorderLayout.CENTER);
				pnlImagenFondo.setRutaImagen("/imagenes/imagenfondo.png");
				pnlImagenFondo.setPreferredSize(new java.awt.Dimension(522, 355));
				scpListado = new JScrollPane();
				pnlImagenFondo.add(scpListado);
				scpListado.setBounds(22, 33, 381, 231);
				{
					tblConsulta = new JTable();
					scpListado.setViewportView(tblConsulta);
				}
			}

			pack();
			this.setSize(440, 330);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	
	public void setResultados(AbstractTableModel abstractTableModel) {
		tblConsulta.setModel(abstractTableModel);
	}
	
	

}
